<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<?php wp_head();?>
<?php if ( is_home() ) { ?><title><?php bloginfo('name'); ?> | <?php bloginfo('description'); ?></title><?php } ?>
<?php if ( is_search() ) { ?><title><?php _e("searchrel","may701");?> | <?php bloginfo('name'); ?></title><?php } ?>
<?php if ( is_single() ) { ?><title><?php echo trim(wp_title('',0)); ?> | <?php bloginfo('name'); ?></title><?php } ?>
<?php if ( is_page() ) { ?><title><?php echo trim(wp_title('',0)); ?> | <?php bloginfo('name'); ?></title><?php } ?>
<?php if ( is_category() ) { ?><title><?php single_cat_title(); ?> | <?php bloginfo('name'); ?></title><?php } ?>
<?php if ( is_month() ) { ?><title><?php the_time('F'); ?> | <?php bloginfo('name'); ?></title><?php } ?>
<?php if (function_exists('is_tag')) { if ( is_tag() ) { ?><title><?php  single_tag_title("", true); ?> | <?php bloginfo('name'); ?></title><?php } ?> <?php } ?>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url'); ?>" />
<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" />
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/index.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jQuery Easing.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.transit.min.js"></script>
<!--[if lt IE 8]>
    <script type="text/javascript">
        window.location.href="<?php bloginfo('template_directory'); ?>/killie6"
    </script>
<![endif]-->

<?php if (is_home()){
    $keywords = get_option('mytheme_keywords');;
    $description = get_option('mytheme_description');
} elseif (is_single()){
    if ($post->post_excerpt) {
        $description = $post->post_excerpt;
    } else {
        $description = mb_substr(strip_tags($post->post_content),0,120,'utf-8');
    }
    $keywords = "";      
    $tags = wp_get_post_tags($post->ID);
    foreach ($tags as $tag ) {
        $keywords = $keywords . $tag->name . ", ";
    }
}
?>
<meta name="keywords" content="<?=$keywords?>" />
<meta name="description" content="<?=$description?>" />
<?php if ( is_singular() ){ ?>
    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/comments-ajax.js"></script>
<?php } ?>

</head>
<body>
<div id="gb_toolbar">
	<div class="headcon">
	<div class="logo"><a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('description'); ?>"><img src="<?php bloginfo('template_url'); ?>/images/logo.png"></a></div>
	<?php wp_nav_menu(array('container_id'=>'nav','menu_class'=>'headmenu','theme_location'=>'primary')); ?>
	<div class="headsearch"><?php get_search_form();?></div>
	</div>
</div>
<?php if (is_home()){ ?>
<!--show button-->
<div style="display:none">
    <div id="upsider">
    <div id="upsider-inside"></div>
    </div>
    <!--up toolbar-->
    <div id="upsiderbar" style="display:none">
                <?php if ( ! dynamic_sidebar('widget_tools') ) : ?>
                   
                <?php endif; // end sidebar widget area ?>
    </div>
</div>
    <div id="gb_logo_img">
    <div class="gb_lb">
                <?php if ( ! dynamic_sidebar('img_carousel') ) : ?>
                   
                <?php endif; // end sidebar widget area ?>
    </div>
    </div>
<?php }else {?>
<div id="singleplace"></div>
<?php }?>
<div id="outfrm">
